import { type_mongoDB } from '../../../../../../../../../../../../conect_mongoDB_class_laugh_node';
import { prop_cur_req_user_identity } from '../../../../../../../../../Classes/cla_req_cur_headers_info';
import { req_info_increase_type } from '../../../../../../../../type/api/increase_type/Classes/cla_req_info_increase_type';
import { spacename_user } from '../../../../../../../DataDefine/sourceData';
import { spacename_self_type } from '../../../DataDefine/sourceData';

/**
 * 获取 当前 用户 的 私有 类型表
 *
 * 统一 存在 type 数据库中
 *
 * self_type_user_${cur_info.user_id}
 */
export function get_db_cur_user_self_type(cur_info: req_info_increase_type) {
  let dn_cur_user_self_type = `${spacename_self_type}_${spacename_user}_${cur_info[prop_cur_req_user_identity]}`;

  return type_mongoDB.collection(dn_cur_user_self_type);
}
